from sklearn_benchmarks.reporting.hp_match import HPMatchReporting
reporting = HPMatchReporting(against_lib="onnx", config="config.yml")
reporting.make_report()
We assume here there is a perfect match between the hyperparameters of both librairies. For a given set of parameters and a given dataset, we compute the speedup
time scikit-learn / time onnx. For instance, a speedup of 2 means that onnx is twice as fast as scikit-learn for a given set of parameters and a given dataset.
KNeighborsClassifier_brute_force¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: algorithm=brute.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.663 | 1.000 | 0.337 |
| 2 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.757 | 0.243 |
| 4 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.757 | 0.882 | 0.125 |
| 7 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.882 | 1.000 | 0.118 |
| 8 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.757 | 0.243 |
| 10 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.882 | 0.663 | 0.219 |
| 13 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.757 | 1.000 | 0.243 |
| 14 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 1.000 | 0.922 | 0.078 |
| 16 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 0.663 | 0.929 | 0.266 |
| 19 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 0.896 | 1.000 | 0.104 |
| 20 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 1.000 | 0.922 | 0.078 |
| 22 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 0.922 | 0.896 | 0.026 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.538 | 0.0 | -1 | 1 | 15.479 | 0.032 | 0.663 | 0.001 | 0.001 | See | See |
| 3 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.557 | 0.0 | -1 | 5 | 0.287 | 0.005 | 1.000 | 0.037 | 0.037 | See | See |
| 6 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.571 | 0.0 | 1 | 100 | 15.460 | 0.038 | 0.882 | 0.001 | 0.001 | See | See |
| 9 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.010 | 0.0 | 7.644 | 0.0 | -1 | 100 | 0.286 | 0.005 | 1.000 | 0.037 | 0.037 | See | See |
| 12 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.011 | 0.0 | 7.590 | 0.0 | 1 | 5 | 3.381 | 0.011 | 0.896 | 0.003 | 0.003 | See | See |
| 15 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 100 | 0.010 | 0.0 | 7.643 | 0.0 | 1 | 1 | 0.213 | 0.004 | 1.000 | 0.049 | 0.049 | See | See |
| 18 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 2 | 0.004 | 0.0 | 0.420 | 0.0 | -1 | 1 | 3.762 | 0.013 | 0.929 | 0.001 | 0.001 | See | See |
| 21 | KNeighborsClassifier_brute_force | fit | 100000 | 100000 | 2 | 0.004 | 0.0 | 0.376 | 0.0 | -1 | 5 | 0.242 | 0.004 | 1.000 | 0.018 | 0.018 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.070 | 0.234 | 0.000 | 0.002 | -1 | 1 | 0.283 | 0.007 | 1.000 | 7.314 | 7.316 | See | See |
| 2 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.021 | 0.002 | 0.000 | 0.021 | -1 | 1 | 15.290 | 0.136 | 0.757 | 0.001 | 0.001 | See | See |
| 4 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.721 | 0.078 | 0.000 | 0.003 | -1 | 5 | 15.330 | 0.082 | 0.882 | 0.178 | 0.178 | See | See |
| 5 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.022 | 0.003 | 0.000 | 0.022 | -1 | 5 | 0.286 | 0.006 | 1.000 | 0.076 | 0.076 | See | See |
| 7 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 1.906 | 0.009 | 0.000 | 0.002 | 1 | 100 | 0.285 | 0.005 | 1.000 | 6.693 | 6.694 | See | See |
| 8 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.019 | 0.000 | 0.000 | 0.019 | 1 | 100 | 15.169 | 0.053 | 0.757 | 0.001 | 0.001 | See | See |
| 10 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 2.701 | 0.042 | 0.000 | 0.003 | -1 | 100 | 15.353 | 0.008 | 0.663 | 0.176 | 0.176 | See | See |
| 11 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.021 | 0.002 | 0.000 | 0.021 | -1 | 100 | 0.286 | 0.005 | 1.000 | 0.075 | 0.075 | See | See |
| 13 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 1.882 | 0.004 | 0.000 | 0.002 | 1 | 5 | 0.241 | 0.006 | 1.000 | 7.795 | 7.797 | See | See |
| 14 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.019 | 0.000 | 0.000 | 0.019 | 1 | 5 | 3.724 | 0.014 | 0.922 | 0.005 | 0.005 | See | See |
| 16 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 100 | 1.150 | 0.004 | 0.001 | 0.001 | 1 | 1 | 3.768 | 0.013 | 0.929 | 0.305 | 0.305 | See | See |
| 17 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 100 | 0.018 | 0.000 | 0.000 | 0.018 | 1 | 1 | 0.241 | 0.005 | 1.000 | 0.075 | 0.075 | See | See |
| 19 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 1.783 | 0.036 | 0.000 | 0.002 | -1 | 1 | 0.240 | 0.005 | 1.000 | 7.420 | 7.421 | See | See |
| 20 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 0.005 | 0.004 | 0.000 | 0.005 | -1 | 1 | 3.727 | 0.011 | 0.922 | 0.001 | 0.001 | See | See |
| 22 | KNeighborsClassifier_brute_force | predict | 100000 | 1000 | 2 | 2.628 | 0.077 | 0.000 | 0.003 | -1 | 5 | 3.775 | 0.020 | 0.896 | 0.696 | 0.696 | See | See |
| 23 | KNeighborsClassifier_brute_force | predict | 100000 | 1 | 2 | 0.009 | 0.005 | 0.000 | 0.009 | -1 | 5 | 0.240 | 0.005 | 1.000 | 0.038 | 0.038 | See | See |
KNeighborsClassifier_kd_tree¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: algorithm=kd_tree.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.929 | 1.000 | 0.071 |
| 2 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.946 | 0.054 |
| 4 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.946 | 0.951 | 0.005 |
| 7 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.951 | 1.000 | 0.049 |
| 8 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.946 | 0.054 |
| 10 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.951 | 0.929 | 0.022 |
| 13 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.946 | 1.000 | 0.054 |
| 14 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 1.000 | 0.911 | 0.089 |
| 16 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.929 | 0.894 | 0.035 |
| 19 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.891 | 1.000 | 0.109 |
| 20 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 1.000 | 0.911 | 0.089 |
| 22 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.911 | 0.891 | 0.020 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 2.745 | 0.028 | 0.029 | 0.0 | -1 | 1 | 106.853 | 0.000 | 0.929 | 0.026 | 0.026 | See | See |
| 3 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.295 | 0.030 | 0.024 | 0.0 | -1 | 5 | 2.311 | 0.207 | 1.000 | 1.426 | 1.432 | See | See |
| 6 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.315 | 0.052 | 0.024 | 0.0 | 1 | 100 | 107.347 | 0.000 | 0.951 | 0.031 | 0.031 | See | See |
| 9 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.316 | 0.066 | 0.024 | 0.0 | -1 | 100 | 2.618 | 0.164 | 1.000 | 1.267 | 1.269 | See | See |
| 12 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.635 | 0.073 | 0.022 | 0.0 | 1 | 5 | 0.039 | 0.013 | 0.891 | 93.662 | 99.077 | See | See |
| 15 | KNeighborsClassifier_kd_tree | fit | 1000000 | 1000000 | 10 | 3.705 | 0.114 | 0.022 | 0.0 | 1 | 1 | 0.004 | 0.000 | 1.000 | 824.261 | 824.541 | See | See |
| 18 | KNeighborsClassifier_kd_tree | fit | 1000 | 1000 | 2 | 0.001 | 0.001 | 0.018 | 0.0 | -1 | 1 | 0.053 | 0.001 | 0.894 | 0.017 | 0.017 | See | See |
| 21 | KNeighborsClassifier_kd_tree | fit | 1000 | 1000 | 2 | 0.001 | 0.000 | 0.030 | 0.0 | -1 | 5 | 0.004 | 0.000 | 1.000 | 0.120 | 0.120 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | iteration_throughput | latency | n_jobs | n_neighbors | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.801 | 0.921 | 0.000 | 0.001 | -1 | 1 | 2.351 | 0.286 | 1.000 | 0.341 | 0.343 | See | See |
| 2 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.002 | 0.001 | 0.000 | 0.002 | -1 | 1 | 105.586 | 0.000 | 0.946 | 0.000 | 0.000 | See | See |
| 4 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 1.043 | 0.468 | 0.000 | 0.001 | -1 | 5 | 107.361 | 0.000 | 0.951 | 0.010 | 0.010 | See | See |
| 5 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.003 | 0.001 | 0.000 | 0.003 | -1 | 5 | 2.309 | 0.179 | 1.000 | 0.001 | 0.001 | See | See |
| 7 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 5.536 | 0.393 | 0.000 | 0.006 | 1 | 100 | 2.577 | 0.061 | 1.000 | 2.148 | 2.149 | See | See |
| 8 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.003 | 0.001 | 0.000 | 0.003 | 1 | 100 | 107.975 | 0.000 | 0.946 | 0.000 | 0.000 | See | See |
| 10 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 3.100 | 0.220 | 0.000 | 0.003 | -1 | 100 | 107.164 | 0.000 | 0.929 | 0.029 | 0.029 | See | See |
| 11 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.005 | 0.001 | 0.000 | 0.005 | -1 | 100 | 2.312 | 0.169 | 1.000 | 0.002 | 0.002 | See | See |
| 13 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 1.634 | 0.260 | 0.000 | 0.002 | 1 | 5 | 0.005 | 0.000 | 1.000 | 345.865 | 346.172 | See | See |
| 14 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.002 | 0.000 | 0.000 | 0.002 | 1 | 5 | 0.034 | 0.001 | 0.911 | 0.045 | 0.045 | See | See |
| 16 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1000 | 10 | 0.881 | 0.251 | 0.000 | 0.001 | 1 | 1 | 0.053 | 0.001 | 0.894 | 16.743 | 16.745 | See | See |
| 17 | KNeighborsClassifier_kd_tree | predict | 1000000 | 1 | 10 | 0.001 | 0.000 | 0.000 | 0.001 | 1 | 1 | 0.005 | 0.000 | 1.000 | 0.200 | 0.200 | See | See |
| 19 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.022 | 0.011 | 0.001 | 0.000 | -1 | 1 | 0.005 | 0.000 | 1.000 | 4.948 | 4.950 | See | See |
| 20 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 0.002 | 0.001 | 0.000 | 0.002 | -1 | 1 | 0.034 | 0.001 | 0.911 | 0.070 | 0.070 | See | See |
| 22 | KNeighborsClassifier_kd_tree | predict | 1000 | 1000 | 2 | 0.021 | 0.001 | 0.001 | 0.000 | -1 | 5 | 0.034 | 0.001 | 0.891 | 0.616 | 0.616 | See | See |
| 23 | KNeighborsClassifier_kd_tree | predict | 1000 | 1 | 2 | 0.002 | 0.000 | 0.000 | 0.002 | -1 | 5 | 0.004 | 0.000 | 1.000 | 0.393 | 0.393 | See | See |
HistGradientBoostingClassifier_best¶onnx (1.10.1) vs. scikit-learn (1.0.dev0)
All estimators share the following parameters: learning_rate=0.01, n_iter_no_change=10.0, max_leaf_nodes=100.0, max_bins=255.0, min_samples_leaf=100.0, max_iter=300.0.
| estimator | function | n_samples_train | n_samples | n_features | accuracy_score_sklearn | accuracy_score_onnx | diff_accuracy_scores | |
|---|---|---|---|---|---|---|---|---|
| 1 | HistGradientBoostingClassifier_best | predict | 100000 | 1000 | 100 | 0.824 | 1.0 | 0.176 |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | n_iter | iteration_throughput | latency | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | HistGradientBoostingClassifier_best | fit | 100000 | 100000 | 100 | 100.054 | 0.0 | 300 | 0.001 | 0.001 | 0.452 | 0.02 | 0.824 | 221.208 | 221.421 | See | See |
| estimator | function | n_samples_train | n_samples | n_features | mean_duration_sklearn | std_duration_sklearn | n_iter | iteration_throughput | latency | mean_duration_onnx | std_duration_onnx | accuracy_score_onnx | speedup | std_speedup | sklearn_profiling | onnx_profiling | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | HistGradientBoostingClassifier_best | predict | 100000 | 1000 | 100 | 0.102 | 0.001 | 300 | 0.008 | 0.0 | 0.373 | 0.01 | 1.0 | 0.273 | 0.273 | See | See |